1. Field of the Invention
The present invention relates to disk drives. More particularly, the present invention relates to a method of operating a disk drive for writing to an addressable location after detecting that a head is within a safe-to-write window.
2. Description of the Prior Art
A disk drive has a control system generally comprising an interface microprocessor, which directs the activities of the disk drive, and a servo microprocessor, which controls the position of a read/write head. The interface and servo functions may be embodied in a single microprocessor or in separate microprocessors. A disk controller or formatter circuit automates disk data transfer functions such as reading and writing data sectors under control of the interface microprocessor. An exemplary such disk drive is shown in commonly assigned U.S. Pat. No. 5,965,992 to Goretzki et al which is hereby incorporated by reference.
During a write operation initiated by a host computer, a disk drive receives a sequential series or xe2x80x9cstringxe2x80x9d of data blocks from the host. The string of data blocks is stored in a disk memory buffer for writing to corresponding addressable locations on a data track of a disk. Each addressable location may be a structure on the track known as a data sector, conventionally referenced by a logical block address (LBA). The control system of the disk drive requires that the read/write head be positioned over the track and that the head follow the track to within a tolerance limit during the entire write operation. When the head is positioned within the tolerance limit, the head is said to be within a safe-to-write window. If the head wanders off-track or outside the tolerance limit for whatever reason during a write operation, the head is declared to be outside the safe-to-write window by the control system and the write operation must stop to avoid overwriting data on an adjacent track or tracks. One reason the head may wander off-track is that the drive may have been subjected to a shock impulse. Conventionally, to recover from such a shock event, the disk drive control system will wait until the head is once again following the track within the tolerance limits and the first addressable location corresponding to the string passes under the head on a subsequent revolution of the disk before attempting to re-write the string of data blocks. The control system will therefore wait until the appropriate servo wedge preceding the first data block to be written passes under the head to verify track following within tolerance levels before attempting the write operation again.
It should be understood for this discussion that the disk drive head conventionally comprises an integration of separate read/write elements in a fixed relationship such that the read element provides position information to the servo controller and the servo controller uses the position information to position the head to place the write element on track for writing.
FIG. 1 is a timing diagram of a write operation in a prior art disk drive in the presence of a condition causing the head to wander outside a safe-to-write window. FIG. 1 is divided into an upper and a lower portion. The upper portion illustrates sequences of events occurring during a first pass of the addressable locations under the head, whereas the lower portion thereof illustrates the sequence of events occurring during a second pass of the addressable locations under the head. Bold arrows 102 and 104 indicate the length of time the write operation is pending during the first and second passes respectively. A disk track 150, as shown in FIG. 1, includes a plurality of addressable locations D1-D12 corresponding to a string of logical data blocks D1-D12, received from a host for writing, and embedded servo sectors or xe2x80x9cwedgesxe2x80x9d S1-S3 interspersed there between. The servo wedges are read by the head and used by the control system to determine the head""s most recent position on the disk. As the head positioning system is a sampled system, the precise position of the head is unknown until a servo wedge is read and the position information stored therein is processed. As shown in FIG. 1, a disk controller command (Write D1-D12) is issued by a system control microprocessor to cause the head to write data blocks D1 through D12 on the track 150 from a buffer memory. As the media is rotating, the disk controller has an opportunity to write the data blocks D1-D12 during a xe2x80x9cpassxe2x80x9d of the string of data blocks D1-D12 under the head. The pass is initiated by the addressable location D1 passing under the head. The pass is terminated when the addressable location D12 passes under the head. In the illustration of FIG. 1, the shaded addressable locations have been written, whereas those that are not shaded have yet to be written to disk. During the writing of data block D2, a signal (safe-to-write) asserting a safe-to-write-condition is de-asserted, indicating that it is no longer safe to write to the disk. The safe-to-write signal is a signal that is transmitted by the servo controller and if de-asserted may cause the write operation to be immediately aborted. The safe-to-write signal may be de-asserted for a variety of reasons, and generally indicates a temporary condition that may disappear over time.
A shock event is one such temporary condition. During the shock event, the head may have wandered outside a safe-to-write window, increasing the likelihood that data on adjacent tracks may be inadvertently overwritten. After reading the servo wedge S2 and determining that the head is now back on the desired track or within the tolerance limit, the safe-to-write signal is re-asserted. There is some latency between the reading of the servo wedge S2 and the reassertion of the safe-to-write signal as the head passes over data sector D6, as some processing time is required to determine the position of the head. Although the diagram of FIG. 1 shows the safe-to-write signal being re-asserted immediately following servo wedge S2 for illustration of the concept, actual practice would dictate that the safe-to-write condition be tested repeatedly until some number of servo wedges have been read in succession to verify that the read/write head is staying within the safe-to-write window.
The writing of the data blocks, as shown in the upper portion of FIG. 1, stopped after writing D2. As shown in the lower portion of prior art FIG. 1, the disk drive control system refrains from writing any data blocks until another pass is initiated. In this case, the next pass is labeled as second pass. As whatever event caused the servo controller to de-assert a safe-to-write condition occurred at some indeterminate time prior to servo wedge S1, the servo controller (after the safe-to-write condition is restored at some time after S2 during the first pass) backs up and re-writes the entire string of data blocks D1-D12, as shown in the lower portion of FIG. 1. In practice, the head may be commanded to back up a predetermined number of blocks (as measured from the servo wedge at which it was determined that the head has wandered off-track) before rewriting all or a portion of the string of data blocks, as a precautionary measure. Therefore, according to the prior art disk drive operating method, at least two revolutions of the disk or one revolution plus the time for the complete string of blocks D1-D12 to pass under the head during second pass 104 are necessary to complete the write operation. In this illustration, the summed length of arrowed lines labeled 102 and 104 indicates the relative length of time required to complete the operation.
Original Equipment Manufacturers (OEM""s) of disk-drive-containing systems often specify disk drive performance requirements that must be met by disk drive manufacturers. Such requirements often specify the maximum data transfer performance degradation that is allowed as the drives are subjected to and recover from an event (such as a shock impulse) that causes a safe-to-write condition to be terminated. In the case of a shock event, such performance requirements may be met by equipping the drive with costly shock sensors or mechanical shock dampeners, for example. Competitive pressures in the disk drive industry, however, preclude such a course of action. A preferred solution to the problem of efficiently recovering from an off-track condition would not require such added hardware. There is a need, therefore, for methods of operating a disk drive to efficiently recover from events terminating a safe-to-write-condition that do not depend upon costly mechanical hardware or added manufacturing steps.
This invention may be regarded as a method for writing a string of data blocks in a disk drive. The disk drive has a head positioned over a track on a rotating disk. The string of data blocks has a starting data block and an ending data block which are required to be written sequentially in respective addressable locations disposed on the track. The respective addressable locations include a leading addressable location corresponding to the starting data block and a trailing addressable location corresponding the ending data block. With regard to the invention, a pass is defined to be an interval which is initiated by the leading addressable location passing under the head, and terminated by the trailing addressable location passing under the head. The method of the invention comprises the steps of determining if the head is positioned within a safe-to-write window and if the head is determined to be positioned within a safe-to-write window, performing the steps of determining that an addressable location which is required to be written has passed under the head during the pass without being written; determining if another addressable location which is required to be written has yet to pass under the head during the pass; and if so then writing to the other addressable location during the pass.